package com.wsc.indexer.tests;

import java.net.MalformedURLException;
import java.net.URL;

import com.wsc.indexer.LuceneIndexer;
import com.wsc.indexer.VisitedUrls;

/**
 * @author madhu
 *
 */

public class Indexertest {
 
	public static void main(String[] args) throws MalformedURLException {

		LuceneIndexer indx=new LuceneIndexer("/home/madhu/WSCindex");
		indx.index(new URL("http://www.google.com"));
		
		System.out.println("Is visited :"+VisitedUrls.isVisited("http://www.google.com", "/home/madhu/WSCindex"));
		
		System.out.println("number of urls in the Index: "+indx.getNumberOfUrlsInIndex());
		
		indx.closeIndex();
	}
}

